<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改方剂与药物关联关系')" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-medicine-edit" th:object="${sysAppPrescriptioninfoMedicine}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">方剂id：</label>
                <div class="col-sm-8">
                    <input name="prescriptioninfoId" th:field="*{prescriptioninfoId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
				<label class="col-sm-3 control-label">药物设置：</label>
				<div class="col-sm-8">
					<select name="medicineId" class="form-control m-b" th:with="type=${@medicine.getInfos(1)}">
	                    <option th:each="medicine : ${type}" th:text="${medicine.medicineName}" th:value="${medicine.id}" th:field="*{medicineId}"></option>
	                </select>
				</div>
			</div>
            <!-- <div class="form-group">    
                <label class="col-sm-3 control-label">药物名称：</label>
                <div class="col-sm-8">
                    <input name="medicineName" th:field="*{medicineName}" class="form-control" type="text">
                </div>
            </div> -->
            <div class="form-group">    
                <label class="col-sm-3 control-label">药物剂量：</label>
                <div class="col-sm-8">
                    <input name="medicineDosage" th:field="*{medicineDosage}" class="form-control" type="text">
                </div>
            </div>
            <!-- <div class="form-group">    
                <label class="col-sm-3 control-label">使用方式：</label>
                <div class="col-sm-8">
                    <input name="usageMode" th:field="*{usageMode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">创建时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="creteTime" th:value="${#dates.format(sysAppPrescriptioninfoMedicine.creteTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div> -->
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: select2-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/prescriptioninfomedicine";
        $("#form-medicine-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-medicine-edit').serialize());
            }
        }

        $("input[name='creteTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>